package easybooking.data;

import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;

import java.util.*;

/**
 * Implementation of the Interface <code>Booking</code>.
 * @see Booking
 * @author Hakan Keles
 */
// <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
// #[regen=yes,id=DCE.7471D420-F7C7-5B1F-7290-D34FDA03DCA3]
// </editor-fold> 
public class BookingImpl extends UnicastRemoteObject implements Booking {

    /**
     * ID of the booking.
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.76852A54-1F00-F5F3-2758-420D464820A7]
    // </editor-fold> 
    private int bookingId = 0;
    /**
     * Date of the booking.
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.DC5E3010-27FF-EEF5-23B5-17D1427FE956]
    // </editor-fold> 
    private Date dateTime = null;
    /**
     * Check-in status of the booking.
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.3A6C7A60-2621-253D-FEAD-64DCE4544449]
    // </editor-fold> 
    private boolean isCheckedIn = false;
    /**
     * Status of the booking.
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.1EC9F8C6-A53E-B112-CD28-F34189F693A0]
    // </editor-fold> 
    private boolean isActive = true;
    /**
     * Check-in date of the booking.
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.BF430E5D-75C7-FB98-11AF-303344091AC6]
    // </editor-fold> 
    private Date checkedInDateTime = null;
    /**
     * Association to the customer, who books the booking.
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.182FC57C-E639-D720-67AA-DB4E5B0DA8F7]
    // </editor-fold> 
    private int customerId = 0;
    /**
     * Association to the seat, which is allocated for a customer.
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.56C88EA9-7F96-8762-A226-9BA8BED09F5E]
    // </editor-fold> 
    private int seatId = 0;
    /**
     * Association to the flight, which can be booked.
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.4A40E2D5-8A69-7C25-8CF1-1C0F35491CC6]
    // </editor-fold> 
    private int flightId = 0;

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.9BD4A9F7-55B5-2B23-23F7-6F39234D6618]
    // </editor-fold> 
    public BookingImpl() throws RemoteException {
    }

    /**
     * Read-out the ID of the booking.
     * @return ID
     * @throws java.rmi.RemoteException
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.137928B2-566A-E430-456A-B2E2F73B1B10]
    // </editor-fold> 
    public int getBookingId() throws RemoteException {
        return this.bookingId;
    }

    /**
     * Read-out the Date of the booking.
     * @return Date
     * @throws java.rmi.RemoteException
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.B755F766-9016-9357-54AE-CD33F56C8EEF]
    // </editor-fold> 
    public Date getDateTime() throws RemoteException {
        return this.dateTime;
    }

    /**
     * Boolean, which shows if the customer has checked in.
     * @return boolean
     * @throws java.rmi.RemoteException
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.C0F27D55-3130-22C5-2A3B-4F0C0B5DF40C]
    // </editor-fold> 
    public boolean getIsCheckedIn() throws RemoteException {
        return this.isCheckedIn;
    }

    /**
     * Read-out the status of the booking.
     * @return status
     * @throws java.rmi.RemoteException
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.FE0AA9A8-9C97-B77E-F9FE-6719BACD3137]
    // </editor-fold> 
    public boolean getIsActive() throws RemoteException {
        return this.isActive;
    }

    /**
     * Read-out the date, on which the customer has checked in.
     * @return Date
     * @throws java.rmi.RemoteException
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.C6B52D3B-B1F3-4C14-31D5-0335C82CC8FC]
    // </editor-fold> 
    public Date getCheckedInDateTime() throws RemoteException {
        return this.checkedInDateTime;
    }

    /**
     * Read-out the ID of the customer, who books the booking.
     * @return ID
     * @throws java.rmi.RemoteException
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.0B345B7E-BAF8-793F-FEB1-FB17F0A98923]
    // </editor-fold> 
    public int getCustomerId() throws RemoteException {
        return this.customerId;
    }

    /**
     * Read-out the ID of the seat.
     * @return ID
     * @throws java.rmi.RemoteException
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.34820931-2387-F3C9-4F72-CD36147FFCC2]
    // </editor-fold> 
    public int getSeatId() throws RemoteException {
        return this.seatId;
    }

    /**
     * Set the ID of the booking.
     * @param bookingId The id of the booking.
     * @throws java.rmi.RemoteException
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.4DA25A36-F874-9473-A4A1-7A65058F54C3]
    // </editor-fold> 
    public void setBookingId(int bookingId) throws RemoteException {
        this.bookingId = bookingId;
    }

    /**
     * Set the Date of the booking.
     * @param dateTime The date of the booking.
     * @throws java.rmi.RemoteException
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.339B903D-D240-A90E-E47D-CED2053B6EE8]
    // </editor-fold> 
    public void setDateTime(Date dateTime) throws RemoteException {
        this.dateTime = dateTime;
    }

    /**
     * Set the check-in of a customer.
     * @param checkedIn The status of the check-in.
     * @throws java.rmi.RemoteException
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.CC1E1D93-AF8A-A3BE-5D7E-E5ED78B201C8]
    // </editor-fold> 
    public void setIsCheckedIn(boolean checkedIn) throws RemoteException {
        this.isCheckedIn = checkedIn;
    }

    /**
     * Set the status of the booking.
     * @param status The status of the booking.
     * @throws java.rmi.RemoteException
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.1B0DAEA7-C2D8-91D0-C205-BB24DD6E7786]
    // </editor-fold> 
    public void setIsActive(boolean status) throws RemoteException {
        this.isActive = status;
    }

    /**
     * Set the date of the customer check-in.
     * @param checkedInDateTime The Date of the check-in.
     * @throws java.rmi.RemoteException
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.0E958777-99A6-C704-F054-ACD944FA4008]
    // </editor-fold> 
    public void setCheckedInDateTime(Date checkedInDateTime) throws RemoteException {
        this.checkedInDateTime = checkedInDateTime;
    }

    /**
     * Set the ID of the customer.
     * @param customerId The ID of the customer.
     * @throws java.rmi.RemoteException
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.C8D2575B-1E22-DBB6-E490-7FA6E204D667]
    // </editor-fold> 
    public void setCustomerId(int customerId) throws RemoteException {
        this.customerId = customerId;
    }

    /**
     * Set the ID of the seat.
     * @param seatId The ID of the seat.
     * @throws java.rmi.RemoteException
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.8B7AB096-5478-2E48-FF16-ECE7972FD54F]
    // </editor-fold> 
    public void setSeatId(int seatId) throws RemoteException {
        this.seatId = seatId;
    }

    /**
     * Read-out the ID of the flight.
     * @return ID
     * @throws java.rmi.RemoteException
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.1DF3ED83-9545-3018-FFFC-66952EDBC865]
    // </editor-fold> 
    public int getFlightId() throws RemoteException {
        return this.flightId;
    }

    /**
     * Set the ID of the flight.
     * @param flightId The ID of the flight.
     * @throws java.rmi.RemoteException
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.7FC5CD43-AA8C-1210-9FDA-A05487FE20F9]
    // </editor-fold> 
    public void setFlightId(int flightId) throws RemoteException {
        this.flightId = flightId;
    }
}

